const http = require('../utils/http')

const HTTP = new http.HTTP()

// 获取商品详情
export function goodsInfoById(id, callback) {
    console.log(id)
    HTTP.request('/goods/info/' + id, 'GET', {}, res => {
        callback(res)
    })

}


// 购买商品
export function getBuyGoods(params, callback) {

    HTTP.request('/goods/buyGoods', 'POST', params, res => {
        callback(res)
    })
}


export function goodsExchangeGoodsByRecords(params, callback) {
    HTTP.request(
        "/goods/exchangeGoodsByRecords",
        "POST",
        params,
        res => {
            callback(res);
        }
    )
}
